
package guoan.repository;

import java.util.List;

import guoan.domain.Adv;
import guoan.domain.AdvType;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface AdvRepository extends PagingAndSortingRepository<Adv, Long>,
        JpaSpecificationExecutor<Adv> {


    List<Adv> findByAdvTypeIdOrderByOrderIdDesc(Long id);

    List<Adv> findTop5ByAdvTypeIdOrderByOrderIdDesc(Long id);

    Adv findTo1ByType(String string);

}
